package tech.aistar.day04;

import java.util.Date;

/**
 * 本类用来演示:
 *
 * @author: success
 * @date: 2022/7/21 3:19 下午
 */
public class OrdTest {
    public static void main(String[] args) {
        //1. 创建一个客户
        Customer customer = new Customer(1,"admin","110",new Date());

        //2. 模拟几个订单信息
        Ord o1 = new Ord(1,"1001",0,100.0d,new Date());
        Ord o2 = new Ord(2,"1002",0,100.0d,new Date());
        Ord o3 = new Ord(3,"1003",0,200.0d,new Date());
        Ord o4 = new Ord(4,"1004",0,100.0d,new Date());
        Ord o5 = new Ord(5,"1005",0,300.0d,new Date());

        //客户开始添加订单信息
        customer.add(o1);
        customer.add(o2);
        customer.add(o3);

        //输出
        customer.printOrdList();

        //删除
        customer.delByOrdNo("1002");


        System.out.println("======");
        //查找所有删除的订单
        Ord[] ords = customer.findByStatus(3);
        System.out.println("\t已删除订单如下:>");
        for (Ord ord : ords) {
            System.out.println("\t"+ord);
        }
    }
}
